<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" 
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:comp="http://java.sun.com/jsf/composite/register"
	xmlns:p="http://primefaces.org/ui">
	<h:head>
		<title>MyM</title>
	</h:head>
	<h:body style="text-align:center">		
		<f:event type="preRenderView" listener="#{loginController.redirectToHome}" />
		
		<div style="margin:250 auto; text-align: center; width: 500px;">
			<h:form id="loginForm" prependId="false">
				<p:panel header="Login">
					<h:panelGrid columns="2" cellpadding="5">
						<h:outputText value="Username:" for="j_username"/>
						<h:inputText id="j_username"/>
						<h:outputText value="Password:" for="j_password"/>
						<h:inputSecret id="j_password"/>
						<h:outputText value="Remember me" for="_spring_security_remember_me"/>
						<h:selectBooleanCheckbox id="_spring_security_remember_me" />				
					</h:panelGrid>
					<h:commandButton value="Login" type="submit" action="#{loginController.doLogin}"/>
					<h:commandButton value="Cancel" action="#{loginController.cancelLogin}"/>
				</p:panel>
			</h:form>
		</div>		
	</h:body>
</html>
